package cn.dong.ucenter.feign;

import cn.dong.api.domain.CommonResult;
import cn.dong.ucenter.feign.fallback.SmsServiceImpl;
import com.netflix.client.ClientException;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.GetMapping;

@Service
@FeignClient(value = "service-sms5000", fallback = SmsServiceImpl.class)
public interface SmsService {

    /**
     * 发送信息
     * @param phone
     * @return
     * @throws ClientException
     */
    @GetMapping("/sms/send/{phone}")
    CommonResult send(String phone) throws ClientException;


}
